package com.gipson.amc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 用户
 * </p>
 *
 * @author zj
 * @since 2020-04-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SYS_AUTHORITY")
public class Authority extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	
	public static Integer TYPE_MENU = 1;
	public static Integer TYPE_PERMISSON = 2;
	
	
	@TableId(value = "ID", type = IdType.UUID)
	private String id; // GUID主键
	
	/**
	 * 编码
	 */
	@TableField("CODE")
	private String code;
	
	/**
	 * 上级编码
	 */
	@TableField("PARENT_CODE")
	private String parentCode;
	
	/**
	 * 名称
	 */
	@TableField("NAME")
	private String name;
	
	/**
	 * 类型1.菜单 2.权限
	 */
	@TableField("TYPE")
	private Integer type;
	
	/**
	 * 权限标识
	 */
	@TableField("PERMISSION")
	private String permission;
	
	/**
	 * 链接
	 */
	@TableField("HREF")
	private String href;
	
	/**
	 * 大图标
	 */
	@TableField("ICON")
	private String icon;
	
	/**
	 * 小图标
	 */
	@TableField("IMG_URL")
	private String imgUrl;
	
	@TableField("SORT")
	private Integer sort;
	
	/**
	 * 应用ID
	 */
	@TableField("APPLICATION_ID")
	private String applicationId;
	
	/**
	 * 联表查询字段
	 */
	@TableField(exist = false)
	private String parentName; //上级菜单名称
	
	@TableField(exist = false)
	private String applicationCode; //系统编号
	
	@TableField(exist = false)
	private String applicationName; //系统名称
	
	
	
}
